package com.th.supcom.pds.impl.manager.impl;

import java.util.List;
import java.util.Map;

import net.carefx.fc.framework.db.manager.GetSequenceHelper;

import org.apache.ibatis.session.RowBounds;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.th.supcom.pds.domain.pojo.PhamMachineConfig;
import com.th.supcom.pds.impl.dao.PhamMachineConfigMapper;
import com.th.supcom.pds.impl.manager.PhamMachineConfigManager;

/**
 * PhamMachineConfig 管理接口实现.
 * 
 * 药房机器属性配置.
 */
public class PhamMachineConfigManagerImpl implements PhamMachineConfigManager
{
    public static final String TAB_PHAM_MACHINE_CONFIG = "PHAM_MACHINE_CONFIG";

    private PhamMachineConfigMapper m_phamMachineConfigMapper;

    /** 序列生成器. */
    private GetSequenceHelper m_getSequenceHelper;

    /**
     * 默认的构造函数.
     */
    public PhamMachineConfigManagerImpl ()
    {

    }

    /**
     * 获取PhamMachineConfigMapper.
     * 
     * @return PhamMachineConfigMapper.
     */
    public PhamMachineConfigMapper getPhamMachineConfigMapper ()
    {
        return m_phamMachineConfigMapper;
    }

    /**
     * 注入PhamMachineConfigMapper.
     * 
     * @param phamMachineConfigMapper set phamMachineConfigMapper.
     */
    public void setPhamMachineConfigMapper (PhamMachineConfigMapper phamMachineConfigMapper)
    {
        m_phamMachineConfigMapper = phamMachineConfigMapper;
    }

    /**
     * 获取序列.
     * 
     * @return GetSequenceHelper
     */
    public GetSequenceHelper getGetSequenceHelper ()
    {
        return m_getSequenceHelper;
    }

    /**
     * 注入序列.
     * 
     * @param getSequenceHelper getSequenceHelper.
     */
    public void setGetSequenceHelper (GetSequenceHelper getSequenceHelper)
    {
        m_getSequenceHelper = getSequenceHelper;
    }

    @Override
    public PhamMachineConfig getPhamMachineConfigByID (Long id)
    {
        return m_phamMachineConfigMapper.getPhamMachineConfigByID (id);
    }

    @Override
    public Long getPhamMachineConfigSeq ()
    {
        return m_getSequenceHelper.getNextSequenceId (TAB_PHAM_MACHINE_CONFIG);
    }

    @Override
    public List <PhamMachineConfig> findPhamMachineConfigListByExample (PhamMachineConfig phamMachineConfig)
    {
        return m_phamMachineConfigMapper.findPhamMachineConfigListByExample (phamMachineConfig);
    }

    @Override
    public int findPhamMachineConfigCountByExample (PhamMachineConfig phamMachineConfig)
    {
        return m_phamMachineConfigMapper.findPhamMachineConfigCountByExample (phamMachineConfig);
    }

    @Override
    public List <PhamMachineConfig> findPhamMachineConfigListByMap (Map <String, Object> params)
    {
        return m_phamMachineConfigMapper.findPhamMachineConfigListByMap (params);
    }

    @Override
    public List <PhamMachineConfig> findPhamMachineConfigPagingByMap (Map <String, Object> params, Integer offset, Integer limit)
    {
        return m_phamMachineConfigMapper.findPhamMachineConfigPagingByMap (new RowBounds (offset, limit), params);
    }

    @Override
    public Integer findPhamMachineConfigCountByMap (Map <String, Object> params)
    {
        return m_phamMachineConfigMapper.findPhamMachineConfigCountByMap (params);
    }

    @Override
    public int modifyPhamMachineConfig (PhamMachineConfig phamMachineConfig)
    {
        return m_phamMachineConfigMapper.modifyPhamMachineConfig (phamMachineConfig);
    }

    @Override
    public int modifyPhamMachineConfigByExample (PhamMachineConfig phamMachineConfig)
    {
        return m_phamMachineConfigMapper.modifyPhamMachineConfigByExample (phamMachineConfig);
    }

    @Override
    public int removePhamMachineConfigByID (Long id)
    {
        return m_phamMachineConfigMapper.removePhamMachineConfigByID (id);
    }

    @Override
    public int removePhamMachineConfigByMap (Map <String, Object> params)
    {
        return m_phamMachineConfigMapper.removePhamMachineConfigByMap (params);
    }

    @Override
    public void addPhamMachineConfig (PhamMachineConfig phamMachineConfig)
    {
        phamMachineConfig.setPhamMachineConfigId (getPhamMachineConfigSeq ());
        m_phamMachineConfigMapper.addPhamMachineConfig (phamMachineConfig);
    }

    /** 日志记录器. */
    public static final Logger s_logger = LoggerFactory.getLogger (PhamMachineConfigManagerImpl.class);

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";
}